<?php
    require_once("storage/predefRoutes.php");
    require_once("model/distance.class.php");
    require_once("needed.php");
    error_reporting(E_ALL);
    
    class test extends abstract_controller {
        
        function prepare_model($request_params, Smarty $smarty_obj) {
//            echo "<pre>";
//            print_r($_POST);
//            echo "</pre>";
            
            $routes = array();
            $placesNumber = array();
            $i = 0;
            //while ($i < 2) {
                $routes[] = new distanceModel(0);
              //  $placesNumber[] = $i;
            //    $i++;
           // }
            
            echo "<pre>";
            print_r($routes[0]);
            echo "</pre>";
            $smarty_obj->assign('page_title', 'TurYr: Værmelding');
            $smarty_obj->assign('routes', $routes);
            //$smarty_obj->assign('placesNumber', $placesNumber);
        }
    }
?>
